//
//  CommunityTableTableViewController.h
//  WeCommunity
//
//  Created by mac on 2017/8/9.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AdMobModel.h"
#import "DynamicModel.h"
#import "DynamicCell.h"
#import "DynamicAdMobTableViewCell.h"
#import "CWebViewController.h"

typedef NS_ENUM(NSInteger, LoadDataType) {
    LoadDataType_ReLoadData = 0,
    LoadDataType_LoadData = 1,
    LoadDataType_RefreshData = 2,
    LoadDataType_loadNewData = 3,
};

@interface CommunityTableTableViewController : UITableViewController

@property (nonatomic,assign) NSInteger  dataType;

@property (nonatomic,strong) NSMutableArray * dataSource;
@property (nonatomic,strong) MJRefreshAutoGifFooter * footer;
@property (nonatomic,strong) CustomRefreshHeader * refreshHeader;
@property (nonatomic,assign) LoadDataType  loadDataType;

@property (nonatomic,strong) AdMobModel * adMobModel;

#pragma mark - 开始加载数据
-(void)beginLoadingData;

#pragma mark - 下拉刷新数据
-(void)headerRefreshData;

#pragma mark - 加载数据
-(void)loadingData;

-(void)endRefreshAnimation:(BOOL)success;

-(void)addNotification;

-(BOOL)canProcessNext;

#pragma mark -  取最后一条动态数据
-(DynamicModel *)getLastDynamicObject:(NSArray *)array;

-(void)setupUserInterface;


@end
